package com.example.controller;

import com.example.entity.TestEntity;
import com.example.service.impl.TestServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/test")
public class TestApi {

    @Autowired
    TestServiceImpl testService;

    @GetMapping(value = "/id", produces = "application/json;charset=UTF-8")
    public TestEntity sayHello() {
        TestEntity test = testService.putCarRecords();
        test.getName();
        return test;
    }


}
